/**
 * jims
 */
package com.jims.master.modules.finance.entity;

import com.jims.master.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.util.Date;
import java.util.List;
/**
 * Entity
 * @author chentao
 * @version 2017-03-14
 */
public class OutpAcctMaster extends DataEntity<OutpAcctMaster> {
	
	private static final long serialVersionUID = 1L;
	private String acctNo;		// 结账号
	private String rcptsNum;		// 收据张数
	private String refundNum;		// 退费收据张数
	private Double sumAmount;		// 总金额
	private Double refundAmount;		// 退费金额
	private Double chargesAmount;		// 实收金额
	private String freeCount;//免费张数
    private Date acctStartDate ;//结账开始时间
	private Date acctEndDate;//结账结束时间
    private String acctType;//结账类型 0：挂号结账 1：门诊收费结账 2：一卡通消费结账
	private String  startTime;
	private String endTime;
	private List<OutpAcctDetail> outpAcctDetailList;
 	public OutpAcctMaster() {
		super();
	}
    private String cardFlag;
	public OutpAcctMaster(String id){
		super(id);
	}

	@Length(min=1, max=200, message="结账号长度必须介于 1 和 200 之间")
	public String getAcctNo() {
		return acctNo;
	}

	public void setAcctNo(String acctNo) {
		this.acctNo = acctNo;
	}
	
	@Length(min=0, max=11, message="收据张数长度必须介于 0 和 11 之间")
	public String getRcptsNum() {
		return rcptsNum;
	}

	public void setRcptsNum(String rcptsNum) {
		this.rcptsNum = rcptsNum;
	}
	
	@Length(min=0, max=11, message="退费收据张数长度必须介于 0 和 11 之间")
	public String getRefundNum() {
		return refundNum;
	}

	public void setRefundNum(String refundNum) {
		this.refundNum = refundNum;
	}

	
	@Length(min=1, max=64, message="机构ID长度必须介于 1 和 64 之间")
	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	public String getFreeCount() {
		return freeCount;
	}

	public void setFreeCount(String freeCount) {
		this.freeCount = freeCount;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public Double getSumAmount() {
		return sumAmount;
	}

	public void setSumAmount(Double sumAmount) {
		this.sumAmount = sumAmount;
	}

	public Double getRefundAmount() {
		return refundAmount;
	}

	public void setRefundAmount(Double refundAmount) {
		this.refundAmount = refundAmount;
	}

	public Double getChargesAmount() {
		return chargesAmount;
	}

	public void setChargesAmount(Double chargesAmount) {
		this.chargesAmount = chargesAmount;
	}

	public List<OutpAcctDetail> getOutpAcctDetailList() {
		return outpAcctDetailList;
	}

	public void setOutpAcctDetailList(List<OutpAcctDetail> outpAcctDetailList) {
		this.outpAcctDetailList = outpAcctDetailList;
	}

	public Date getAcctStartDate() {
		return acctStartDate;
	}

	public void setAcctStartDate(Date acctStartDate) {
		this.acctStartDate = acctStartDate;
	}

	public Date getAcctEndDate() {
		return acctEndDate;
	}

	public void setAcctEndDate(Date acctEndDate) {
		this.acctEndDate = acctEndDate;
	}

	public String getAcctType() {
		return acctType;
	}

	public void setAcctType(String acctType) {
		this.acctType = acctType;
	}

    public String getCardFlag() {
        return cardFlag;
    }

    public void setCardFlag(String cardFlag) {
        this.cardFlag = cardFlag;
    }

    /**
     * 是否一卡通结账
     * @return
     */
    public boolean isOneCard(){
        boolean returnVal=false;
        if(this.cardFlag!=null&&!"".equals(cardFlag)){
            returnVal=true;
        }
        return returnVal;
    }
}